package demo.model.bean;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * @author   zkessentials store  This class provides a representation of a   {@code   Product}  
 */
@Entity
@Table(name = "products")
public class Product {

	/**
	 * @uml.property  name="id"
	 */
	@Id
	@GeneratedValue(strategy = GenerationType.AUTO)
	private long id;

	/**
	 * @uml.property  name="name"
	 */
	@Column(name = "productname")
	private String name;

	/**
	 * @uml.property  name="createDate"
	 */
	@Temporal(TemporalType.TIMESTAMP)
	private Date createDate;
	/**
	 * @uml.property  name="price"
	 */
	private float price;
	/**
	 * @uml.property  name="quantity"
	 */
	private int quantity;
	/**
	 * @uml.property  name="available"
	 */
	private boolean available;
	/**
	 * @uml.property  name="imgPath"
	 */
	private String imgPath;

	public Product() {
	}

	public Product(long id, String name, Date createDate, float price,
			int quantity, boolean available, String imgPath) {
		super();
		this.id = id;
		this.name = name;
		this.createDate = createDate;
		this.price = price;
		this.quantity = quantity;
		this.available = available;
		this.imgPath = imgPath;
	}

	/**
	 * @return
	 * @uml.property  name="id"
	 */
	public long getId() {
		return id;
	}

	/**
	 * @param  id
	 * @uml.property  name="id"
	 */
	public void setId(long id) {
		this.id = id;
	}

	/**
	 * @return
	 * @uml.property  name="name"
	 */
	public String getName() {
		return name;
	}

	/**
	 * @param  name
	 * @uml.property  name="name"
	 */
	public void setName(String name) {
		this.name = name;
	}

	/**
	 * @return
	 * @uml.property  name="createDate"
	 */
	public Date getCreateDate() {
		return createDate;
	}

	/**
	 * @param  createDate
	 * @uml.property  name="createDate"
	 */
	public void setCreateDate(Date createDate) {
		this.createDate = createDate;
	}

	/**
	 * @return
	 * @uml.property  name="price"
	 */
	public float getPrice() {
		return price;
	}

	/**
	 * @param  price
	 * @uml.property  name="price"
	 */
	public void setPrice(float price) {
		this.price = price;
	}

	/**
	 * @return
	 * @uml.property  name="quantity"
	 */
	public int getQuantity() {
		return quantity;
	}

	/**
	 * @param  quantity
	 * @uml.property  name="quantity"
	 */
	public void setQuantity(int quantity) {
		this.quantity = quantity;
	}

	/**
	 * @return
	 * @uml.property  name="available"
	 */
	public boolean isAvailable() {
		return available;
	}

	/**
	 * @param  available
	 * @uml.property  name="available"
	 */
	public void setAvailable(boolean available) {
		this.available = available;
	}

	/**
	 * @return
	 * @uml.property  name="imgPath"
	 */
	public String getImgPath() {
		return imgPath;
	}

	/**
	 * @param  imgPath
	 * @uml.property  name="imgPath"
	 */
	public void setImgPath(String imgPath) {
		this.imgPath = imgPath;
	}

}
